package com.ykdl.member.kid.prefs;

import java.util.Date;

import android.app.Activity;
import android.content.Context;
import android.content.SharedPreferences;
import android.content.SharedPreferences.Editor;

import com.ykdl.member.base.QLog;
/**
 * 放置 爱问 中 我赞过的  赞的数量
 * 
 * @param result
 */
public class PostLikeNumberPre {
	private static SharedPreferences post_like_number;
	private static SharedPreferences.Editor post_like_number_editor;
	//private static final String CIRCLESTATE = "state";
	private static final String CIRCLESTATENAME = "post_like_number";

	public PostLikeNumberPre(Context context) {
		if (post_like_number == null) {
			post_like_number = context.getSharedPreferences(CIRCLESTATENAME,
					Activity.MODE_PRIVATE);
			if (post_like_number_editor == null) {
				post_like_number_editor = post_like_number.edit();
			}
		} else {
			if (post_like_number_editor == null) {
				post_like_number_editor = post_like_number.edit();
			}
		}
	}
	public void setPraisesState(int key,boolean state) {
		post_like_number_editor.putBoolean(""+key, state);
		post_like_number_editor.commit();
	}

	public boolean getPraisesState(int id) {
		return post_like_number.getBoolean(id+"", false);
	}
	
	
	public void  clearData( ){
		post_like_number_editor.clear();
		post_like_number_editor.commit();
	}
	
	
}